/*
 * @Description:
 * @Date: 2022-11-07 16:12:23
 * @LastEditors: czp
 * @LastEditTime: 2023-04-07 10:50:51
 */

/**
 * @description: 开发 mode
 */
export const devMode = "dev";

/**
 * @description: 生产 mode
 */
export const proMode = "pro";

/**
 * @description: 获取环境
 * @returns:
 * @example:
 */
export function getEnvMode(): string {
	return getEnvValue("ENV_MODE");
}

/**
 * @description: 获取环境变量
 * @returns:
 * @example:
 */
export function getEnvValue(key: keyof IEnv) {
	return import.meta.env[key];
}

/**
 * @description:
 * @returns:
 * @example:
 */
export function getBaseUrl(): string {
	return getEnvValue("ENV_BASE_URL");
}
